<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Factories\HasFactory;

/**
 * App\Models\GoldEnd
 *
 * @property int $id
 * @property int $gold_round_id
 * @property int $gold_product_id
 * @property \Illuminate\Support\Carbon|null $ended_at
 * @property \Illuminate\Support\Carbon|null $created_at
 * @property \Illuminate\Support\Carbon|null $updated_at
 * @property-read \App\Models\GoldProduct|null $goldProduct
 * @property-read \App\Models\GoldRound|null $goldRound
 * @method static \Database\Factories\GoldEndFactory factory(...$parameters)
 * @method static \Illuminate\Database\Eloquent\Builder|GoldEnd newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|GoldEnd newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|GoldEnd query()
 * @method static \Illuminate\Database\Eloquent\Builder|GoldEnd whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|GoldEnd whereEndedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|GoldEnd whereGoldProductId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|GoldEnd whereGoldRoundId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|GoldEnd whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|GoldEnd whereUpdatedAt($value)
 * @mixin \Eloquent
 */
class GoldEnd extends Model
{
    use HasFactory;

    protected $guarded = ['id'];

    protected $dates = [
        'ended_at'
    ];

    public function goldRound(): BelongsTo
    {
        return $this->belongsTo(GoldRound::class);
    }

    public function goldProduct(): BelongsTo
    {
        return $this->belongsTo(GoldProduct::class);
    }
}
